package com.designmodel.atcion.iterator;

/**
 * 迭代器模式
 *
 * @author think
 * @version 1.0.0
 * @since 2020/4/22
 */
public class Test {

    public static void main(String[] args) {
        Collection collection = new MyCollection();
        Iterator it = collection.iterator();

        while (it.hasNext()) {
            System.out.print(it.next() + " ");
        }
    }
}
